﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ProjectoPV_ESW.Account.DiaEscolar
{
    /// <summary>
    /// Classe desenvolvida por Sofia Pombo.
    /// </summary>
    public partial class DiaEscolarSeleccionarDiaForm : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void ButtonVerDiaEscolar_Click(object sender, EventArgs e)
        {
            if (this.SelectDiaCalendar.SelectedDate.DayOfWeek == DayOfWeek.Sunday ||
                this.SelectDiaCalendar.SelectedDate.DayOfWeek == DayOfWeek.Saturday)
            {
                this.LabelErro.Text = "Erro - Só existem dias escolares de segunda a sexta.";
            }
            else
            {

                Session["DataDiaDiaEscolar"] = this.SelectDiaCalendar.SelectedDate;
                Response.Redirect("DiaEscolarVerDadosForm.aspx");
            }

        }
    }
}